package com.wjyf.reducing_bento.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 优惠券基础配置表
 * </p>
 *
 * @author wjyf
 * @since 2023-03-14 08:36:32
 */
@Data
@Accessors(chain = true)
@TableName("tb_coupon")
//@ApiModel(value = "CouponBean对象", description = "优惠券基础配置表")
public class CouponBean implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("自动增加ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "优惠卷数量")
    @TableField("cpnum")
    private Long cpnum;

    @ApiModelProperty(value = "所属类型,1为满减")
    @TableField("`type`")
    private Integer type;

    @ApiModelProperty(value = "优惠券名称")
    @TableField("`name`")
    private String name;

    @ApiModelProperty("图片的URL地址")
    @TableField("img")
    private String img;

    @ApiModelProperty("优惠券开始时间")
    @TableField("start_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    @ApiModelProperty("优惠券结束时间")
    @TableField("end_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    @ApiModelProperty("优惠券金额，用整数，固定值目前。")
    @TableField("money")
    private BigDecimal money;

    @ApiModelProperty("状态，0表示未开始，1表示进行中，-1表示结束")
    @TableField("`status`")
    private Integer status;

    @ApiModelProperty("优惠券的说明")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("金额满")
    @TableField("full_money")
    private BigDecimal fullMoney;




}
